package helper

type ResponseCode int

// 错误码定义
const (
	ResponseCodeOk ResponseCode = 1000
	// 验证的错误码 2000开头
	ResponseCodeValidationError ResponseCode = 2000
	// 请求参数错误
	ResponseCodeRequestParamsError ResponseCode = 3000
	// 服务器内部错误
	ResponseCodeInnerServerError ResponseCode = 4000
	// 业务错误码
	ResponseCodeBusinessError ResponseCode = 5000
)

type Response struct {
	Code ResponseCode `json:"code"`
	Message string `json:"message"`
	Data interface{} `json:"data"`
}